package com.lagou.service;

import com.lagou.bean.User;
import com.lagou.dao.UserDao;
import com.lagou.factory.UserDaoFactory;

/**
 * 编程实现校验用户登录类的功能
 */
public class UserService {
    /**
     * 自定义成员变量记录用户数据访问对象
     */
    UserDao userDao;

    /**
     * 对变量进行初始化
     */
    public UserService() {
        this.userDao = UserDaoFactory.getUserDao();
    }

    /***
     * 自定义方法对账号密码进行校验
     * @param user
     * @return
     */
    public User loginUserService(User user){
        return userDao.login(user);
    }

}
